package service

import (
	"project/PersonalBlog/dao/db"
	"project/PersonalBlog/model"
)

//GetComments ..获取所有评论
func GetComments(id int64) (coms []*model.Comment) {
	coms = db.SelectComments(id)
	return
}

//InputComments ..插入评论
func InputComments(com *model.Comment) (id int64) {
	id = db.InsertComment(com)
	return
}

//GetLeaves ..获取所有留言
func GetLeaves() (coms []*model.Comment) {
	coms = db.SelectCommentsWD()
	return
}

//InputLeaves ..插入留言
func InputLeaves(com *model.Comment) (id int64) {
	id = db.InsertCommentWD(com)
	return
}
